package com.ufm.patient.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ufm.patient.dao.PatientMapper;
import com.ufm.patient.pojo.Patient;
import com.ufm.patient.service.IPatientService;
@Service
@Transactional
public class PatientServiceImpl implements IPatientService{
	@Autowired
	private PatientMapper patientMapper;
	@Override
	public List<Patient> findAll(Map param) {
		return patientMapper.findAll(param);
	}

	@Override
	public void insert(Patient patient) {
		patientMapper.insert(patient);
		
	}

	@Override
	public void delete(long id) {
		patientMapper.delete(id);
		
	}

	@Override
	public void deleteAll() {
		patientMapper.deleteAll();
		
	}

	@Override
	public void update(Patient patient) {
		patientMapper.update(patient);
		
	}

	@Override
	public Patient findById(Integer id) {
		return patientMapper.findById(id);
	}

}
